/* ==================== 用户相关样式 ==================== */
/* 更新时间: 2024-12-19 网易云风格红色主题 */

/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 100vh;
    color: #333;
}

/* 登录注册页面容器 - 网易云风格背景 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    position: relative;
    overflow: hidden;
}

/* 网易云风格背景装饰 */
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 85%, rgba(236, 65, 65, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(255, 99, 99, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 107, 0.04) 0%, transparent 50%);
    animation: cloudFloat 20s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: 
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 1px,
            rgba(236, 65, 65, 0.02) 1px,
            rgba(236, 65, 65, 0.02) 2px
        );
    animation: cloudPattern 25s linear infinite;
}

@keyframes cloudFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-15px) rotate(1deg);
        opacity: 1;
    }
}

@keyframes cloudPattern {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 表单卡片 - 网易云风格 */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(236, 65, 65, 0.12),
        0 0 0 1px rgba(236, 65, 65, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(236, 65, 65, 0.1);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(236, 65, 65, 0.15),
        0 0 0 1px rgba(236, 65, 65, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 32px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #ec4141, #ff6363);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -0.5px;
}

.auth-card h2::before {
    content: '♪';
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    -webkit-text-fill-color: initial;
    background: none;
    color: #ec4141;
}

.auth-card h2::after {
    content: '♪';
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    -webkit-text-fill-color: initial;
    background: none;
    color: #ec4141;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

/* 输入框样式 - 网易云风格 */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(236, 65, 65, 0.15);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    font-weight: 400;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #ec4141;
    box-shadow: 
        0 0 0 3px rgba(236, 65, 65, 0.08),
        0 4px 12px rgba(236, 65, 65, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #999;
    font-weight: 400;
    font-size: 14px;
}

/* 验证码样式 - 网易云风格 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.captcha-container input {
    flex: 1;
}

.captcha-container img {
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(236, 65, 65, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.captcha-container img:hover {
    border-color: #ec4141;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.15);
}

/* 按钮样式 - 网易云风格 */
.auth-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #ec4141, #ff6363);
    color: white;
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(236, 65, 65, 0.35);
    color: white;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #ec4141;
    border: 1px solid rgba(236, 65, 65, 0.2);
    box-shadow: 0 2px 8px rgba(236, 65, 65, 0.08);
}

.btn-secondary:hover {
    background: #ec4141;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 65, 65, 0.25);
    text-decoration: none;
}

/* 错误信息样式 */
.text-danger {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.text-danger::before {
    content: '⚠';
    font-size: 12px;
}

/* 个人中心页面样式 - 网易云风格 */
.user-center {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
}

.user-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 85%, rgba(236, 65, 65, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(255, 99, 99, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 107, 0.03) 0%, transparent 50%);
    animation: cloudFloat 20s ease-in-out infinite;
}

.center-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 48px;
    box-shadow: 
        0 8px 32px rgba(236, 65, 65, 0.12),
        0 0 0 1px rgba(236, 65, 65, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(236, 65, 65, 0.1);
    position: relative;
    z-index: 1;
}

.center-header {
    text-align: center;
    margin-bottom: 48px;
}

.center-header h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ec4141, #ff6363);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    position: relative;
    letter-spacing: -0.5px;
}

.center-header h1::before {
    content: '♪';
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    -webkit-text-fill-color: initial;
    background: none;
    color: #ec4141;
}

.center-header h1::after {
    content: '♪';
    position: absolute;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    -webkit-text-fill-color: initial;
    background: none;
    color: #ec4141;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(236, 65, 65, 0.08), rgba(255, 99, 99, 0.06));
    border-radius: 12px;
    border: 1px solid rgba(236, 65, 65, 0.1);
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.08);
}

.avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ec4141;
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(236, 65, 65, 0.3);
}

.user-details h3 {
    color: #333;
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 600;
}

.user-details p {
    color: #666;
    font-size: 16px;
    font-weight: 400;
}

/* 功能卡片 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.feature-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.feature-card a {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* 修改密码页面 */
.password-form {
    max-width: 500px;
    margin: 0 auto;
}

.password-form .form-group {
    margin-bottom: 25px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .auth-card h2 {
        font-size: 24px;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .center-container {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px 15px;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功/错误提示 */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-left-color: #27ae60;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left-color: #e74c3c;
}

/* 功能卡片 - 网易云风格 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(236, 65, 65, 0.08);
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.06);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #ec4141, #ff6363);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(236, 65, 65, 0.12);
    border-color: rgba(236, 65, 65, 0.15);
}

.feature-card h4 {
    color: #333;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.feature-card a {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ec4141, #ff6363);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(236, 65, 65, 0.2);
    font-size: 14px;
}

.feature-card a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.3);
    color: white;
    text-decoration: none;
}

/* 修改密码页面 - 网易云风格 */
.password-form {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 8px 24px rgba(236, 65, 65, 0.08);
    border: 1px solid rgba(236, 65, 65, 0.1);
}

.password-form .form-group {
    margin-bottom: 24px;
}

/* 链接样式 - 网易云风格 */
a {
    color: #ec4141;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: #ff6363;
    text-decoration: underline;
}

/* 表单验证状态 */
.form-group.success input {
    border-color: #27ae60;
}

.form-group.error input {
    border-color: #e74c3c;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 10px;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background: #e74c3c;
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background: #f39c12;
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: #27ae60;
}
